package com.ciaojian.core.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 券码授予记录
 * </p>
 *
 * @author Atlakyn
 * @since 2021-08-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("d_coupon_grant_record")
public class CouponGrantRecord extends Model<CouponGrantRecord> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 授予方
     */
    private Integer source;

    /**
     * 被授予方
     */
    private Integer target;

    /**
     * 授予券码
     */
    private String code;

    private Date addTime;

    @ApiModelProperty("领取时间")
    private Date receivedTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
